package Day04;

import java.util.Scanner;

public class CommandBySwitch {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请选择功能: 1.存款 2.取款 .转帐 4.退出");
        int command = scan.nextInt();
        switch (command){
            case 1:
                System.out.println("存款");
                break;
            case 2:
                System.out.println("取款");
                break;
                case 3:
                System.out.println("转账");
                break;
                case 4:
                System.out.println("退出");
                break;
            default:
                System.out.println("输入错误,请重新输入");
        }
        /*if(command==1){
            System.out.println("存款");
        }else if (command==2){System.out.println("取款");}
        else if (command==3){System.out.println("转账");}
        else if (command==4){System.out.println("退出");}
        else {System.out.println("输入错误,请重新输入");
        }*/

    }
}
